package org.example.netty.Protobuf.sever;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.example.netty.Protobuf.MyDataInfo;

public class protobufServerHandler extends SimpleChannelInboundHandler<MyDataInfo.MyMessage> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, MyDataInfo.MyMessage msg) throws Exception {
        System.out.println(msg.getDataType());
        System.out.println(msg.getPerson().getName());
        System.out.println(msg.getPerson().getAge());
        System.out.println(msg.getPerson().getAddress());
    }
}
